export function mFormat(distance) {
  if(distance < 1000){
    return distance.toFixed(1)+"m";
  } else if(distance > 1000){
    return (Math.round(distance/100)/10).toFixed(1) + "km";
  }

}
export function kmFormat(distance) {
  if (distance > 0){
    return distance.toFixed(1)+"km";
  }else{
    return distance.toFixed(3)*1000+"m";
  }
}
